package service

import (
	"go_20210605/dao"
	"go_20210605/model"

	"github.com/pkg/errors"
)

type userServie struct {
}

var UserService = userServie{}

func (u *userServie) FindById(id int) (*model.User, error) {
	user, err := dao.UserDao.FindById(id)
	if err != nil {
		err = errors.WithMessage(err, "service find user err")
	}
	return user, err
}
